package com.whmskj.xjlhsc.jitapi.mapper;

import com.whmskj.xjlhsc.jitapi.entity.Device;
import com.whmskj.xjlhsc.jitapi.entity.Dict;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Mapper
public interface DeviceMapper {

    /**
     * 查询所有设备
     * @return
     */
    List<Device> allDevice();

    /**
     * 根据车间查询设备信息
     * @param workshop
     * @return
     */
    List<Map<String, Object>> listDevice(@Param("workshop") String workshop);

    List<Device> getDeviceListByProcess(@Param("processId") Integer processId);

    List<Device> selectByIds(@Param("ids") Set<Integer> ids);

    Device getById(Integer deviceId);

    Integer getDbIdByDeviceId(@Param("deviceId") Integer deviceId);

    List<Device> selectByProcess(@Param("process") String process);

    List<Device> findByDeviceName(@Param("deviceName") String deviceName);
}
